package com.example.vehicle.Controller;

import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ResourceBundle;

/**
 * @name: RouteViewController
 * @description: 路径规划界面控制器类。
 * @author: Lulu Zhao
 **/
public class RouteViewController implements Initializable {
    @FXML
    public WebView routeWebView;

    @Override
    public void initialize(URL url, ResourceBundle resourceBundle) {
        File file = new File("src/main/resources/web/chart.html");
        WebEngine webEngine = routeWebView.getEngine();
        try {
            webEngine.load(file.toURI().toURL().toString());
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
    }
}
